home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Borland Plateform / TURBO PASCAL 1.5 for WIN / OWL.PAK / BWCC.PAS next >
Encoding:
Pascal/Delphi Source File  |  1992-06-08  |  4.2 KB  |  109 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Turbo Pascal                                    }
  5. {       Borland Custom Control Interface Unit           }
  6. {                                                       }
  7. {       Copyright (c) 1991 Borland International        }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit BWCC;
  12.  
  13. interface
  14.  
  15. uses WinTypes, WObjects;
  16.  
  17. const
  18.   BwccVersion = $0100;
  19.  
  20.   { BWCC Custom Dialog class }
  21.   BorDlgClass = 'BorDlg';
  22.  
  23.   { Borland dialog window property for instance data }
  24.   BorDlgProp = 'FB';
  25.  
  26.   idHelp = 998;                      { Id of help button }
  27.  
  28.   { Button style definitions:
  29.     the Borland buttons use Windows button styles for button type: i.e.
  30.     bs_PushButton/bs_DefPushButton }
  31.  
  32.   button_Class = 'BorBtn';           { Our Bitmap Buttons }
  33.   radio_Class  = 'BorRadio';         { Our radio buttons }
  34.   check_Class  = 'BorCheck';         { Our Checkboxes }
  35.  
  36.   { Styles }
  37.   bbs_Bitmap: Longint = $8000;       { this is a bitmap static }
  38.   bbs_DlgPaint: Longint = $4000;     { used at runtime by dialog class }
  39.   bbs_ParentNotify: Longint =$2000;  { Notify parent of TAB keys and focus }
  40.   bbs_OwnerDraw: Longint = $1000;    { let parent paint via wm_DrawItem }
  41.  
  42.   { Messages }
  43.   bbm_SetBits = bm_SetStyle + 10;
  44.  
  45.   { Notifications }
  46.   bbn_SetFocus = bn_DoubleClicked + 10;
  47.   bbn_SetFocusmouse = bn_DoubleClicked + 11;
  48.   bbn_GotaTab = bn_DoubleClicked + 12;
  49.   bbn_GotaBTab = bn_DoubleClicked + 13;
  50.  
  51.   shade_Class = 'BorShade';
  52.  
  53.   bss_Group = 1;        {  group box              }
  54.   bss_Hdip = 2;         {  horizontal border      }
  55.   bss_Vdip = 3;         {  hertical border        }
  56.   bss_Hbump = 4;        {  horizontal speed bump  }
  57.   bss_Vbump = 5;        {  vertical speed bump    }
  58.  
  59.   bss_DlgErase = $8000;   {  Dialog Window erases for us }
  60.   bss_DlgPaint = $4000;   {  Dialog Window paints for us }
  61.  
  62.   static_Class = 'BorStatic';
  63.  
  64. function DialogBox(Instance: THandle; Templatename: PChar;
  65.   WndParent: HWnd; DialogFunc: TFarProc): Integer;
  66. function DialogBoxParam(Instance: THandle; TemplateName: PChar;
  67.   WndParent: HWnd; DialogFunc: TFarProc; InitParam: LongInt): Integer;
  68. function CreateDialog(Instance: THandle; TemplateName: PChar;
  69.   WndParent: HWnd; DialogFunc: TFarProc): HWnd;
  70. function CreateDialogParam(Instance: THandle; TemplateName: PChar;
  71.   WndParent: HWnd; DialogFunc: TFarProc; InitParam: LongInt): HWnd;
  72. function BWCCMessageBox(WndParent: HWnd; Txt, Caption: PChar;
  73.   TextType: Word): Integer;
  74. function BWCCDefDlgProc(Dlg: HWnd; Msg, wParam: Word; lParam:
  75.   LongInt): LongInt;
  76. function BWCCGetPattern: HBrush;
  77. function BWCCGetVersion: Word;
  78. function SpecialLoadDialog(hResMod: THandle; Templatename: PChar;
  79.   DialogFunc: TFarProc): THandle;
  80. function MangleDialog(hDlg: THandle; hResMod: THandle;
  81.   DialogFunc: TFarProc): THandle;
  82. function BWCCDefWindowProc(hWindow: HWnd; Message, wParam: Word;
  83.   lParam: LongInt): LongInt;
  84. function BWCCDefMDIChildProc(hWindow: HWnd; Message, wParam: Word;
  85.   lParam: LongInt): LongInt;
  86.  
  87. implementation
  88.  
  89. function SpecialLoadDialog;             external 'BWCC' index 1;
  90. function DialogBox;                     external 'BWCC' index 2;
  91. function DialogBoxParam;                external 'BWCC' index 3;
  92. function CreateDialog;                  external 'BWCC' index 4;
  93. function CreateDialogParam;             external 'BWCC' index 5;
  94. function BWCCDefDlgProc;                external 'BWCC' index 6;
  95. function BWCCMessageBox;                external 'BWCC' index 9;
  96. function BWCCGetPattern;                external 'BWCC' index 10;
  97. function BWCCGetVersion;                external 'BWCC' index 11;
  98. function MangleDialog;                  external 'BWCC' index 12;
  99. function BWCCDefWindowProc;             external 'BWCC' index 14;
  100. function BWCCDefMDIChildProc;           external 'BWCC' index 15;
  101.  
  102. begin
  103.   WObjects.CreateDialogParam := CreateDialogParam;
  104.   WObjects.DialogBoxParam := DialogBoxParam;
  105.   WObjects.DefDlgProc := BWCCDefDlgProc;
  106.   WObjects.MessageBox := BWCCMessageBox;
  107.   WObjects.BWCCClassNames := True;
  108. end.
  109.